package com.goal98.team.controllers

import com.goal98.team.domain.Page
import com.goal98.team.Constants

class HelpController {

    def index = {
        Page helpPage = Page.findByReference(Constants.REF_HELP_PAGE, [cache:true])
        [helpPage: helpPage]

    }

    def save = {
        def text = params.text
        Page helpPage = Page.findByReference(Constants.REF_HELP_PAGE)
        helpPage.text = text
        helpPage.save()
        forward(action:'index')

    }
}
